/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package databook.util;

import prefuse.action.assignment.SizeAction;
import prefuse.visual.VisualItem;
import prefuse.data.Edge;
import prefuse.data.Node;
//import prefuse.data.expression.Predicate;
import databook.WeightTree;
import databook.DatabookViz;
import databook.controller.Props;


/**
 *
 * @author zach
 */
public class MySizeAction extends SizeAction {
    private SimpleTransformFunction transform;
    
    public MySizeAction(String group, SimpleTransformFunction tf) {
        super(group);
        transform = tf;
    }

    public double getSize(VisualItem item) {  
        return transform.getValue(((WeightTree)item.get(DatabookViz.TREE_COLUMN)).getSize());
    }
}
